<% layout("/common/layout.html",{"title":"工商申请详情"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>工商申请列表</h2>
        <ol class="breadcrumb">
            <li><a href="${ctxPath}/admin/main">主页</a></li>
            <li>工商申请列表</li>
            <li class="active">详情</li>
        </ol>
    </div>
    <div class="col-sm-4">
        <div class="title-action">
            <a class="btn btn-primary btn-sm btn-outline" href="../view/index"><i class="fa fa-reply"> </i> 返回列表</a>
        </div>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="panel panel-default">
        <div class="panel-heading"><b>公司基本信息</b></div>
        <div class="panel-body">
            <div class="form-horizontal">
                <div class="form-group">
                    <label for="companyName" class="control-label-info pull-left">企业名称：</label>
                    <div class="col-sm-10">
                        <div class="input-group col-sm-4">
                            <input id="companyName" name="companyName" class="form-control" type="text" value="${companyApply.companyName}" disabled>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="companyName" class="control-label-info pull-left">备选字号：</label>
                    <div class="col-sm-10" id="companyBrandList">
                        <%
                        if(isNotEmpty(companyBrandOptionalList)){
                        for(brand in companyBrandOptionalList){
                        %>
                        <div class="input-group col-sm-4">
                            <input name="companyBrandOptionalList" class="form-control" type="text" value="${companyApply.region}${brand}${companyApply.industry}${companyApply.companyType}" disabled>
                        </div>
                        <% }
                        }
                        %>
                        <label class="radio-input-inline text text-danger" for="companyBrand">
                            <input type="checkbox" data-message="所有字号都不可用；" name="disable" id="companyBrand"><b>所有字号都不可用</b>
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label for="registeredCapital" class="control-label-info pull-left">注册资本：</label>
                    <div class="col-sm-3">
                        <input id="registeredCapital" name="registeredCapital" class="form-control" type="text" value="${companyApply.registeredCapital}万元" disabled>
                    </div>
                </div>

                <div class="form-group">
                    <label for="industry" class="control-label-info pull-left">企业行业：</label>
                    <div class="col-sm-3">
                        <input id="industry" name="industry" class="form-control" type="text" value="${companyApply.industry}" disabled>
                    </div>
                </div>


                <div class="form-group">
                    <label for="companyType" class="control-label-info pull-left">企业类型：</label>
                    <div class="col-sm-3">
                        <input id="companyType" name="companyType" class="form-control" type="text" value="${companyApply.companyType}" disabled>
                    </div>
                </div>


                <div class="form-group">
                    <label for="companyAddress" class="control-label-info pull-left">注册地址：</label>
                    <div class="col-sm-6">
                        <input id="companyAddress" name="companyAddress" class="form-control" type="text" value="${companyApply.companyAddress}" disabled>
                    </div>
                </div>


                <div class="form-group">
                    <label for="businessScope" class="control-label-info pull-left">经营范围：</label>
                    <div class="col-sm-6">
                        <textarea name="businessScope" class="form-control" id="businessScope" rows="5" disabled>${companyApply.businessScope}</textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label for="businessScope" class="control-label-info pull-left">协议证照：</label>
                    <div class="row col-sm-10" id="businessScopeImage">
                        <div class="col-sm-12" style="margin-top:5px">
                            <label class="radio-input-inline  text text-danger" for="businessScopeImageRefuse">
                                <input type="checkbox" id="businessScopeImageRefuse" value="0" name="businessScopeImageRefuse"><b>协议证照不清晰</b></label>
                        </div>
                        <% if(isNotEmpty(imagesList)){
                        for(image in imagesList){ %>
                        <div class="col-sm-2">
                            <img src="${uploaderFilesDomain!}${image.img!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                        </div>
                        <% } } %>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading"><b>股东基本信息</b></div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th width="8%">姓名</th>
                    <th width="20%">身份</th>
                    <th width="12%">联系方式</th>
                    <th width="10%">出资</th>
                    <th width="12%">证件</th>
                    <th width="16%">证件照</th>
                    <th width="10%">标记</th>
                </tr>
                </thead>
                <tbody>
                <%
                var totalAmount = 0;
                if(isNotEmpty(shareholderList)){
                for(shareholder in shareholderList){
                totalAmount = totalAmount + parseDouble(shareholder.investmentAmount);
                %>
                <tr>
                    <td>${shareholder.name}</td>
                    <td>${webUtil.memberIdentity(shareholder.identitys)}</td>
                    <td><i class="fa fa-phone-square"></i>&nbsp;${shareholder.phone}<br><i class="fa fa-envelope"></i>&nbsp;${shareholder.email}</td>
                    <td>时间：${shareholder.investmentTime}年 <br> 金额：${shareholder.investmentAmount}万元 <br> 类型：${webUtil.memberInvestmentMode(shareholder.investmentMode)}</td>
                    <td>类型：${decode(shareholder.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br>编号：${shareholder.cardNumber}</td>
                    <td class="IDcard">
                        <div class="col-sm-6">
                            <img src="${uploaderFilesDomain!}${shareholder.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                        </div>
                        <div class="col-sm-6">
                            <img src="${uploaderFilesDomain!}${shareholder.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                        </div>
                    </td>
                    <td>
                        <label class="radio-input-inline" for="imagesRefuse_${shareholderLP.index}"><input type="checkbox" id="imagesRefuse_${shareholderLP.index}" value="0" name="imagesRefuse">照片不清晰</label>
                    </td>

                </tr>
                <%
                }
                }
                %>
                </tbody>
            </table>
        </div>
        <div class="panel-footer text text-danger">
            <b>
                <% if(companyApply.registeredCapital != totalAmount){ %>
                错误提示！
                <% } %>
                注册资本：${companyApply.registeredCapital}万元，股东合计投资：${totalAmount}万元。
            </b>
        </div>
    </div>

    <div class="panel panel-default ">
        <div class="panel-heading"><b>成员基本信息</b></div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th width="10%">身份</th>
                    <th width="18%">姓名</th>
                    <th width="18%">联系方式</th>
                    <th width="18%">证件</th>
                    <th width="18%">证件照</th>
                    <th width="10%">标记</th>
                </tr>
                </thead>
                <tbody>
                <%
                if(isNotEmpty(memberList)){
                for(memeber in memberList){
                %>
                <tr>
                    <td>${webUtil.memberIdentity(memeber.identity+'')}</td>
                    <td>${memeber.name}</td>
                    <td><i class="fa fa-phone-square"></i>&nbsp;${memeber.phone}<br><i class="fa fa-envelope"></i>&nbsp;${memeber.email}</td>
                    <td>类型：${decode(memeber.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br/>编号：${memeber.cardNumber}</td>
                    <td class="IDcard">
                        <div class="col-sm-6">
                            <img src="${uploaderFilesDomain!}${memeber.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                        </div>
                        <div class="col-sm-6">
                            <img src="${uploaderFilesDomain!}${memeber.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                        </div>
                    </td>
                    <td>
                        <label class="radio-input-inline" for="imagesRefuse_${memeberLP.index}"><input type="checkbox" id="imagesRefuse_${memeberLP.index}" value="0" name="imagesRefuse">照片不清晰</label>
                    </td>

                </tr>
                <%
                }
                }
                %>
                </tbody>
            </table>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading"><b>审批建议</b></div>
        <div class="panel-body">
            <form class="form-horizontal" name="auditResultForm" method="post" role="form">
                <input id="id" name="id" type="text" value="${companyApply.id}">
                <div class="form-group">
                    <label for="businessScope" class="control-label-info pull-left">审批结果：</label>
                    <div class="col-sm-8">
                        <label class="radio-inline" for="auditStatus1"><input type="radio" value="1" name="auditStatus" id="auditStatus1" checked="checked" required="required">审批通过</label>
                        <label class="radio-inline" for="auditStatus2"><input type="radio" value="0" name="auditStatus" id="auditStatus2">退回修改</label>
                    </div>
                </div>
                <hr>
                <div class="form-group">
                    <label for="businessScope" class="control-label-info pull-left">审批建议：</label>
                    <div class="col-sm-11">
                        <textarea name="auditMessage" class="form-control" id="auditMessage" rows="8" placeholder="请输入审批建议"></textarea>
                    </div>
                </div>
            </form>
        </div>
        <div class="panel-footer">
            <div class="col-sm-offset-3 clearfix">
                <div class="mt5 mb5 block col-sm-3">
                    <a href="index" class="btn btn-warning btn-lg btn-block">返回列表</a>
                </div>
                <div class="mt5 mb5 block col-sm-3">
                    <button type="button" id="doSubmit" class="btn btn-primary btn-lg btn-block">提交审核</button>
                </div>
            </div>
        </div>
    </div>
</div>
<% } %>
<script type="text/javascript">
    //页面JS调用
    require(['company/apply'], function (apply) {
        apply.view();
    });
</script>
